<template>
  <view class="order-detail-bg">
    <!-- 顶部栏 -->
    <view class="order-header">
      <uni-icons type="left" size="24" @click="goBack" style="color: white;margin-right: 10px"/>
      <view class="order-title">订单详情</view>
    </view>

    <!-- 支付成功提示 -->
    <view class="order-success-tip">
      支付成功，请您前往指定门店消费
    </view>

    <!-- 门店信息 -->
    <view class="order-shop-card">
      <uni-icons type="shop" size="20" style="color:#338aff; margin-right:8px"/>
      <view>
        <view class="order-shop">伟业汽车美容店（人民路店）</view>
        <view class="order-shop-addr">山阳区人民中路33号</view>
      </view>
    </view>

    <!-- 订单详情卡片 -->
    <view class="order-info-card">
      <view class="order-info-title">订单详情</view>
      <view class="order-info-row">
        <view>车辆精洗</view>
        <view>￥39.90</view>
      </view>
      <view class="order-info-row">
        <view>车辆附加费用</view>
        <view>0</view>
      </view>
      <view class="order-info-row">
        <view>原价</view>
        <view>￥59.90</view>
      </view>
      <view class="order-info-row">
        <view>店家优惠</view>
        <view class="order-discount">-￥20</view>
      </view>
      <view class="order-info-row">
        <view>优惠券</view>
        <view class="order-discount">-￥10</view>
      </view>
      <view class="order-info-row order-info-total">
        <view>支付金额</view>
        <view class="order-pay">￥29.9</view>
      </view>
    </view>

    <!-- 订单信息卡片 -->
    <view class="order-info-card">
      <view class="order-info-title">订单信息</view>
      <view class="order-info-row">
        <view>订单号：</view>
        <view>121212112487878</view>
      </view>
      <view class="order-info-row">
        <view>下单时间：</view>
        <view>2020.01.08 17:40</view>
      </view>
      <view class="order-info-row">
        <view>车辆：</view>
        <view>奔驰FWE4/豫A98FHJ</view>
      </view>
    </view>
  </view>
</template>

<script setup>
function goBack() {
  uni.navigateBack();
}
</script>

<style scoped lang="scss">
.order-detail-bg {
  min-height: 100vh;
  background: #f5f6fa;
  padding-bottom: 24px;
}
.order-header {
  display: flex;
  align-items: center;
  height: 56px;
  background: #338aff;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  padding: 0 16px;
}
.order-title {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}
.order-success-tip {
  background: #338aff;
  color: #fff;
  text-align: left;
  padding: 8px 24px 8px 24px;
  font-size: 14px;
}
.order-shop-card {
  background: #fff;
  border-radius: 12px;
  margin: 12px 16px 0 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(51,138,255,0.04);
}
.order-shop {
  font-weight: bold;
  color: #222;
}
.order-shop-addr {
  font-size: 12px;
  color: #888;
}
.order-info-card {
  background: #fff;
  border-radius: 12px;
  margin: 12px 16px 0 16px;
  padding: 14px 16px;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(51,138,255,0.04);
}
.order-info-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
  color: #222;
}
.order-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: #333;
  font-size: 15px;
}
.order-info-row:last-child {
  margin-bottom: 0;
}
.order-discount {
  color: #ff4d4f;
}
.order-info-total {
  font-weight: bold;
  color: #222;
  margin-top: 8px;
  font-size: 16px;
}
.order-pay {
  color: #1ec05f;
  font-size: 18px;
  font-weight: bold;
}
</style>
